A network switch creates a local area network (LAN) among a plurality of end nodes, such as workstations, and other network switches connected thereto. Each end node is connected to one port of the network. The ports also serve to connect network switches together.
Each end node sends packets of data to the network switch which the switch then routes either to another of the end nodes connected thereto or to a network switch to which the destination end node is connected. In the latter case, the receiving network switch routes the packet to the destination end node.
Each network switch has to temporarily store the packets of data, which it receives from the units (end node or network switch) connected to it while the switch determines how, when and through which port to retransmit the packets. Each packet can be transmitted to only one destination address (a “unicast” packet) or to more than one unit (a “multicast” or “broadcast” packet). For multicast and broadcast packets, the switch typically stores the packet only once and transmits multiple copies of the packet to some (multicast) or all (broadcast) of its ports. Once the packet has been transmitted to all of its destinations, it can be removed from the memory of the switch or written over.
Each end node has an address, known as a media access control (MAC) address, which is unique to that end node. Each switch maintains an address-table, where each entry is composed of a MAC address and at least its device and port location on that end node.
Network switches can be arranged into architecture groupings, known as virtual LANs (VLANs), which enable a selected number of computers to operate together in a subdivision. Each end node in the VLAN communicates only with the other member end nodes. Thus, if end nodes of the same switch are part of different VLANs, they will not be able to communicate with each other.
Reference is now made to FIGS. 1, 2 and 3 which, respectively, illustrates a basic switching network, the table elements of one switch S1 and details of an associated VLAN table 10. The LAN comprises a multiplicity of computers C1–C15 connected together via a multiplicity of switches, S1, S2 and S3, each having a plurality of ports P1–P7. Each switch comprises ports P1 to P5 each of which connects to one of computers Ci, and ports P6 and P7, which connect to another switch.
Each computer has a MAC address within the network and each switch S includes a global address table 12 which lists each MAC address, its associated switch and port location and at least one of the VLANs to which it belongs. For example, computer C4 is located at (P4, S1); computer C7 is located at (P2, S2); and computer C14 is located at (P5, S3).
The VLAN addresses are additionally compiled in a global VLAN table 14, such as that shown in FIG. 2, which lists each VLAN id and its associated port members, where the port members are defined by at least the port and switch location. The VLAN table is generally 4K entries (VLAN ids) long and 256 bit (port members) wide, and each switch in the network has a copy of it. Consequently, each switch is able to draw from its associated VLAN table the address information of every end node in the network.
The exemplary global VLAN table of FIG. 3 applies to the network illustrated in FIG. 1 and lists the applicable VLAN ids 16 and their associated port members 18. As an example, VLAN id 1 comprises the end nodes located at (P1, S1), (P4, S1), (P2, S2), (P3, S2), (P4, S3) and (P5, S3): and VLAN id 12-2 comprises the end nodes located at (P1, S1), (P3, S1), and (P5, S1); and so on.
Generally, when a switch S receives a packet on a port P, the packet includes the source and destination MAC addresses as well as the VLAN id of the source and destination computers. The packet is submitted to two processes: learning and forwarding.
In the learning process, the switch S searches in the global address table 12 for the source MAC address, which is the MAC address of the port, which sent the packet, together with the VLAN id. If the source MAC address was previously learned for the VLAN id, then switch S will find the MAC address and VLAN id in global address table 12 and the switch S does not need to update table 12. However, if the source MAC address was not learned before, for that VLAN id, then the switch S verifies that the source port is a member of that VLAN, and if so, switch S will learn or update the MAC address with that VLAN id.
In the forwarding process, the switch S searches for the destination MAC address with the VLAN id in global address table 12. If the (destination MAC and VLAN id) address is not found, then the switch S sends the packet to all the members of the VLAN listed in the packet. To do so, switch S retrieves the membership of the VLAN id from global VLAN table 14 and forwards the packet to all the members of that VLAN.
If, on the other hand, the destination address and VLAN id are found, then the address table 12 contains the switch and port location for that station, and the packet is forwarded to that port (which may be on the same switch S or on another switch).